let express = require('express');
let app = express();
var cors = require('cors');
let bodyParser = require('body-parser')
app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())
app.use(cors())

app.get('/goodslist', (req, res)=>{
    console.log('/goodslist');
    console.log(req.query.name);
    res.send('ok');
})

app.post('/add', (req, res) => {
    console.log(req.body);
    res.send('post')
})

app.listen(8080, ()=>{
    console.log('ok');
})